package com.edais.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import com.edais.domain.ChannelWelfareParameters;
import com.edais.domain.WelfareProcessclass;
import com.edais.persistence.ChannelWelfareParametersMapper;
import com.edais.persistence.WelfareProcessclassMapper;

@Repository

public class ChannelWelfareParametersDao {
	
	@Autowired
	private ChannelWelfareParametersMapper channelWelfareParametersMapper;
	
	@Autowired
	private WelfareProcessclassMapper welfareProcessclassMapper;
	
	public List<ChannelWelfareParameters> getParameterBychannelEnName(String channelEnName) {
		return channelWelfareParametersMapper.getParameterBychannelEnName(channelEnName);
	}
	
	public Map<String,String> getAllWelfareProcessclass(){
		Map<String,String> Processclasses = new HashMap<String,String>();
		List<WelfareProcessclass> list=welfareProcessclassMapper.getAllWelfareProcessclass();
		for (int i = 0; i < list.size(); i++) {
			Processclasses.put(list.get(i).getWelfareCategory(), list.get(i).getProcessClass());
		}
		return Processclasses;
	}
}
